package com.sktlab.bizconfmobile.model;

import org.apache.mina.core.session.IoSession;

import com.sktlab.bizconfmobile.mina.MinaMsg;
import com.sktlab.bizconfmobile.mina.MinaUtil;

public class ACVSession extends BaseBusinessSession {
	
	private Conference mConf;
	
	public ACVSession(Conference conf) {
		
		mConf = conf;
	}
	
	@Override
	public void create(IoSession session, LSSession ls) {
		
		MinaMsg msg = new MinaMsg();
		
		msg.clearMsgData();
		msg.setSsnId(ls.getId());
		msg.setSeq(ls.getSeqNum());
		msg.setMsgId(MinaUtil.MSG_LS_CS);
		msg.appendMsgData(MinaUtil.MSG_ACV);
		msg.appendMsgData(ls.getBridgeNumber());					
		msg.appendMsgData(mConf.getAttr().getConfId());
		
		session.write(msg.toString());
	}

}
